<%@ page language="java" import="java.util.*"  pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-cn">
<head>
<base href="<c:url value='/'/>"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title>文件管理</title>
<link rel="stylesheet" href="resources/static/css/pintuer.css">
<link rel="stylesheet" href="resources/static/css/admin.css">
<script src="resources/static/js/jquery.js"></script>
<script src="resources/static/js/pintuer.js"></script>
 <script type="text/javascript">
       function move(currPage,pageSize){
    	   //var pageSize=document.getElementById("pageSize").value;
    	   
    	   var url="article/listarticle?currPage="+currPage;
    	   if(pageSize!=undefined){
    		   url+="&pageSize="+pageSize;
    	   }
    	  /*  if(currPage==1){
    		  $("#1").wrap("<span class="current"></span>");
    	   } */
    	  
    	   location.href=url;
       }
     $(function(){
    	  
    	  $("#1").wrap("<span class='current'></span>");
    	
      }); 
       
    </script>
</head>
<body>

<div class="panel admin-panel">
  <div class="panel-head"><strong class="icon-reorder">文件管理</strong></div>
    <div class="padding border-bottom clearfix">
        <p class="txt-group">
            平台评论数量：<span class="text-main">800</span>
        </p>
        <p class="txt-group">
            平台点赞数量：<span class="text-main">2341</span>
        </p>
    </div>
  <div class="padding border-bottom">
  	<button type="button" class="button border-blue" onClick="window.location.href='article/addarticle'">
      <span class="icon-plus-square-o"></span>
      上传文档</button>
  </div>
  <table class="table table-hover text-center">
      <tr>
          <th width="5%">序号</th>
          <th width="15%">文件名</th>
          <th width="15%">文件类型</th>
          <th width="10%">所属领域</th>
          <th width="10%">定稿时间</th>
          <th width="5%">浏览数</th>
          <th width="5%">下载数</th>
          <th width="5%">点赞数</th>
          <th width="5%">评论数</th>
          <th width="20%">操作</th>
        </tr>
        
         <c:forEach items='${articleList }' var="art">
         <tr>
           <td><c:out value='${art.fileid }'/></td>
           <td>${art.title }</td>
           <td>${art.filetype }</td>
         <td>${art.fieldname }</td>
         <td>${art.finaltime }</td>
         <td>34</td>
          <td>12</td>
          <td>34</td>
          <td>12</td>
         <td><div class="button-group">
              <a class="button border-main" href="article/preupdateart?fileid=${art.fileid}" target="right"><span class="icon-edit"></span>编辑</a>
              <a class="button border-green" href="article/listartbruser?fileid=${art.fileid}" target="right"><span class="icon-edit"></span>查看</a>
              <a class="button border-red" href="article/deletearticle?fileid=${art.fileid}" onClick="return del(1,1)"><span class="icon-trash-o"></span> 删除</a>
          </div></td>
         </tr>
       </c:forEach>
     

      <tr>
        <td colspan="8"><div class="pagelist"> 
        <a href="javascript:move(${page.currPage-1 },${page.pageSize})">上一页</a> 
        <a id="1" href="javascript:void(0)" onclick="move(1,${page.pageSize})">1</a>
        <a id="2" href="javascript:void(0)" onclick="move(2,${page.pageSize})">2</a>
        <a id="3" href="javascript:void(0)" onclick="move(3,${page.pageSize})">3</a>
        <a href="javascript:move(${page.currPage+1 },${page.pageSize})">下一页</a>
        <a href="javascript:move(${page.totalPage },${page.pageSize})">尾页</a> </div></td>
      </tr>

  </table>
</div>
</body>
</html>